home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / hf^k-2.dms / in.adf / MUIClass.Lha / Include / Classes / TWiMUI / Request.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-02  |  3.8 KB  |  132 lines

  1. //
  2. //  $VER: Request.h     1.2 (31 Aug 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21. //  31 Aug 1996 :   1.2 : Änderungen:
  22. //                        - Bei den Konstruktoren für das Array der Parameter
  23. //                          wird die Anzahl mitgegeben.
  24. //
  25.  
  26. #ifndef CPP_TWIMUI_REQUEST_H
  27. #define CPP_TWIMUI_REQUEST_H
  28.  
  29. #ifndef CPP_TWIMUI_APPLICATION_H
  30. #include <classes/twimui/application.h>
  31. #endif
  32.  
  33. #ifndef CPP_TWIMUI_WINDOW_H
  34. #include <classes/twimui/window.h>
  35. #endif
  36.  
  37. #ifndef CLIB_MUIMASTER_PROTOS_H
  38. #include <clib/muimaster_protos.h>
  39. #endif
  40.  
  41. #ifndef _INCLUDE_PRAGMA_MUIMASTER_LIB_H
  42. #include <pragma/muimaster_lib.h>
  43. #endif
  44.  
  45. class MUIRequest
  46.     {
  47.     private:
  48.         Object *app;
  49.         Object *win;
  50.         LONGBITS flags;
  51.         TWiStr title;
  52.         TWiStr gadgets;
  53.         TWiStr format;
  54.         TWiArrayList<ULONG> parms;
  55.         void initparms(const ULONG, const ULONG *);
  56.     public:
  57.         MUIRequest(const MUIApplication &a, const MUIWindow &w, const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  58.             :   app(a),
  59.                 win(w),
  60.                 flags(b),
  61.                 title(t),
  62.                 gadgets(g),
  63.                 format(f),
  64.                 parms(c)
  65.             { initparms(c,p); };
  66.         MUIRequest(const MUIWindow &w, const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  67.             :   app(NULL),
  68.                 win(w),
  69.                 flags(b),
  70.                 title(t),
  71.                 gadgets(g),
  72.                 format(f),
  73.                 parms(c)
  74.             { initparms(c,p); };
  75.         MUIRequest(const MUIApplication &a, const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  76.             :   app(a),
  77.                 win(NULL),
  78.                 flags(b),
  79.                 title(t),
  80.                 gadgets(g),
  81.                 format(f),
  82.                 parms(c)
  83.             { initparms(c,p); };
  84.         MUIRequest(const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  85.             :   app(NULL),
  86.                 win(NULL),
  87.                 flags(b),
  88.                 title(t),
  89.                 gadgets(g),
  90.                 format(f),
  91.                 parms(c)
  92.             { initparms(c,p); };
  93.         MUIRequest()
  94.             :   app(NULL),
  95.                 win(NULL),
  96.                 flags(0UL),
  97.                 title(),
  98.                 gadgets(),
  99.                 format(),
  100.                 parms(0)
  101.             { };
  102.         MUIRequest(const MUIRequest &p)
  103.             :   app(p.app),
  104.                 win(p.win),
  105.                 flags(p.flags),
  106.                 title(p.title),
  107.                 gadgets(p.gadgets),
  108.                 format(p.format),
  109.                 parms(p.parms)
  110.             { };
  111.         MUIRequest(const MUIApplication &, const MUIWindow &, const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  112.         MUIRequest(const MUIWindow &, const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  113.         MUIRequest(const MUIApplication &, const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  114.         MUIRequest(const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  115.         virtual ~MUIRequest();
  116.         MUIRequest &operator=(const MUIRequest &);
  117.         void setApp(const MUIApplication &p) { app = p; };
  118.         void setWin(const MUIWindow &p) { win = p; };
  119.         void setFlags(const ULONG p) { flags = p; };
  120.         void setTitle(const STRPTR p) { title = p; };
  121.         void setGadgets(const STRPTR p) { gadgets = p; };
  122.         void setFormat(const STRPTR p) { format = p; };
  123.         void setParms(const ULONG c, const ULONG *p) { initparms(c,p); };
  124.         void setParms(const ULONG c, ...);
  125.         ULONG show() { return(MUI_RequestA((APTR)app,(APTR)win,flags,title,gadgets,format,(APTR)parms)); };
  126.         ULONG show(const MUIApplication &p) { return(MUI_RequestA((APTR)((Object *)p),(APTR)win,flags,title,gadgets,format,(APTR)parms)); };
  127.         ULONG show(const MUIWindow &p) { return(MUI_RequestA((APTR)app,(APTR)((Object *)p),flags,title,gadgets,format,(APTR)parms)); };
  128.         ULONG show(const MUIApplication &p1, const MUIWindow &p2) { return(MUI_RequestA((APTR)((Object *)p1),(APTR)((Object *)p2),flags,title,gadgets,format,(APTR)parms)); };
  129.     };
  130.  
  131. #endif
  132.